#!/bin/bash
# Convert old rmp csv format to fpp-compatible 14 or 16-field format.
# rmp format: spid 0,lat 1,lon 2,macs 3,rsss 4
# $0 <rmp csv with old format>
#   # FIELD  14col,16col
    # IMEI      0, 3
    # IMSI      1, 4
    # UA        2, 5
    # MCC       3, 6
    # MNC       4, 7
    # LAC       5, 8
    # CI        6, 9
    # rss       7, 10
    # lat       8, 11
    # lon       9, 12
    # h         10,13
    # wlanmacs  11,14
    # wlanrsss  12,15
    # Time      13,2

# to 16col format.
#awk -F, 'BEGIN{OFS=","}{$1=",,,,,,,,,,";$3=$3",";print}' $1
# to 14col format.
awk -F, 'BEGIN{OFS=","}{$1=",,,,,,,";$3=$3",";$5=$5",";print}' $1
